// hoiceText.cpp : implementation file
//

#include "stdafx.h"
#include "InfoHide.h"
#include "hoiceText.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// ChoiceText dialog


ChoiceText::ChoiceText(CWnd* pParent /*=NULL*/)
	: CDialog(ChoiceText::IDD, pParent)
{
	//{{AFX_DATA_INIT(ChoiceText)
	m_textinfo = _T("");
	//}}AFX_DATA_INIT
}


void ChoiceText::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(ChoiceText)
	DDX_Text(pDX, IDC_TextInfo, m_textinfo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(ChoiceText, CDialog)
	//{{AFX_MSG_MAP(ChoiceText)
	ON_BN_CLICKED(IDC_TextPath, OnTextPath)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// ChoiceText message handlers

void ChoiceText::OnTextPath() 
{
	// TODO: Add your control notification handler code here

	static char szFilter[] = "All Files(*.*)|*.*||";

	CFileDialog dlg( TRUE, NULL, NULL,
		OFN_HIDEREADONLY, szFilter );
	if (IDOK == dlg.DoModal())
	{
		m_textinfo=dlg.GetPathName();
	}
	SetDlgItemText(IDC_TextInfo,m_textinfo);
}
